const http = require('http');
const app = http.createServer(function(req, res) {
    res.setHeader('content-type', 'text/plain;charset=utf-8');
    res.write("提灯寻猫");
    let url = req.url;
    if (url == '/doing') {
        res.write("开开心心写代码");
    } else {
        res.write("不写代码了")
    }
    res.end();
})
app.listen('3000', function() {
    console.log('可以访问' + "http://127.0.0.1:3000");
})